<template>
    <div class="box">
        <ul>
            <li>
                <div class="left">
                     <img src="img/bitian@2x.png" alt=""><span>发起人</span>
                </div>
                <div class="right">
                    房禺安
                </div>
            </li>
            <li>
                <div class="left">
                     <img src="img/bitian@2x.png" alt=""><span>隶属校区/部门</span>
                </div>
                <div class="right">
                    房禺安
                </div>
            </li>
        </ul>
        <div class="title">
            <img src="img/bitian@2x.png" alt=""><span>添加人员信息</span>
        </div>
        <ol>
            <li><div class="left">姓名</div><div class="right"><input type="text" placeholder="请输入姓名"></div></li>
            <li><div class="left">手机号</div><div class="right"><input type="number" placeholder="请输入手机号"></div></li>
            <li><div class="left">邮箱</div><div class="right"><input type="text" placeholder="请输入邮箱"></div></li>
            <li @click="openSex"><div class="left">性别</div><div class="right"><span>男</span><van-icon name="arrow" /></div></li>
            <li @click="openPosition"><div class="left">职位</div><div class="right">请选择职位<van-icon name="arrow" /></div></li>
            <li @click="openPart"><div class="left">部门</div><div class="right">请选择部门<van-icon name="arrow" /></div></li>
        </ol>
        <!-- 确定 -->
        <button>确定</button>
        <van-popup v-model="show" position="bottom">
            <van-picker
                show-toolbar
                :columns="columns"
                @confirm="onConfirm"
                @cancel="onCancel"
                @change="onChange"
                />
        </van-popup>
    </div>
</template>
<script>
export default {
    data() {
        return {
            fileList:[],
            show:false,
             columns: ['杭州', '宁波', '温州', '绍兴', '湖州', '嘉兴', '金华', '衢州'],
        }
    },
    methods: {
        openSex(){
            this.columns = ['男','女'];
            this.show = true;
        },
        openPosition(){
            this.columns = ['老师','校长'];
            this.show = true;
        },
        openPart(){
            this.columns = ['老师','校长','于海洋'];
            this.show = true;
        },
        selectPart(){
            this.show = true
        },
         onConfirm(value, index) {
             this.show = false;
        },
        onChange(picker, value, index) {
        
        },
        onCancel() {
        this.show = false
        },
        },
}
</script>
<style lang="scss" scoped>
    .box{
        background:#F7F9FA;
        height: 100%;
    }
    ul{
        li{
            background: white;
            padding: 0.3rem 0.24rem;
            box-sizing: border-box;
            display: flex;
            align-items: center;
            color: #606060;
            font-size: 0.3rem;
            border-top: 0.02rem solid  #F7F9FA;
            justify-content: space-between;
            .rights{
                display: flex;
                align-items: center;
            }
            .left{
                display: flex;
                align-items: center;
                color: #7E7E7E;
                img{
                    width: 0.12rem;
                    height: 0.14rem;
                }
                span{
                    margin-left: 0.1rem;
                }
            }
        }
    }
    button{
        width: 7.02rem;
        height: 0.84rem;
        background: #2E9EFF;
        border: 0.01rem solid #2E9EFF;
        box-shadow: 0.01rem 0.12rem 0.12rem 0.02rem rgba(4, 111, 204, 0.07);
        border-radius: 0.08rem;
        position: fixed;
        bottom: 0.24rem;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.33rem;
        line-height: 0.84rem;
        text-align: center;
        font-family: PingFang SC;
        font-weight: bold;
        color: #FFFFFF;
    }
    .title{
        padding: 0.3rem 0.2rem;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        font-size: 0.3rem;
        font-family: PingFang SC;
        font-weight: 500;
        color: #343434;
        img{
            width: 0.12rem;
            height: 0.14rem;
        }
         span{
                    margin-left: 0.1rem;
                }
    }
    ol{
        li{
            padding: 0.3rem 0.4rem;
            box-sizing: border-box;
            font-size: 0.3rem;
            justify-content: space-between;
            align-items: center;
            display: flex;
            background: white;
            border-bottom: 0.01rem solid #eee;
            .right{
                display: flex;
                align-items: center;
                input{
                    border: none;
                    text-align: right;
                }
            }
        }
    }
</style>